import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:pkg_app_bar/pkg_app_bar.dart';

class AppBarPage extends StatefulWidget {
  const AppBarPage({Key? key}) : super(key: key);

  @override
  _AppBarPageState createState() => _AppBarPageState();
}

class _AppBarPageState extends State<AppBarPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      // appBar: CustomAppBar(title: '首页').build(context),
      // appBar: CustomAppBar(title: '首页',canBack: false).build(context),
      appBar: CustomAppBar(title: "首页", canBack: true, trailingWidget: [
        Icon(Icons.home),
        Icon(Icons.search),
        SizedBox(width: 10)
      ]).build(context),
    );
  }
}
